The present invention relates to a data storage system which is applied to a computer system and has a flash memory unit (also known as "semiconductor disk unit") and a disk drive.
In a conventional computer system, a hard disk drive (HDD) is used as an external memory device wherein a disk is used as a storage medium. The HDD can be used as a large-capacity file apparatus. However, as compared to a main memory comprising a semiconductor memory (e.g. a DRAM), the access speed of the HDD is lower. A cache system for the HDD has been known as means for increasing the access speed of the HDD.
In the cache system, in particular, frequently used data is-stored in a storage medium having a higher access speed than the HDD, thereby compensating the low access speed of the HDD. In a specific system, a part of the storage area of the main memory (volatile IC memory) comprising a DRAM is used as a cache area of the HDD (this system being called "smartdrive"). In this system, however, the main memory is cleared when the power to the system is switched off. Thus, the cache system does not function when the power is switched on. Accordingly, after the power is switched on, the HDD is accessed to enable the cache system to function effectively, thereby achieving a learning effect. The learning effect will now be described. When a request for access to the HDD occurs, this request first fails since no data is stored in the cache memory (a part of the main memory in this case). Then, the data associated with the access request is read out from the HDD and stored in the cache memory. Thus, if the next access request occurs, the data stored in the cache memory is quickly read out from the cache memory in place of the cache memory. This effect of achieving the cache function is called "leaning effect."
The cache system using the above-described main memory does not effectively function when the first access request for the HDD occurs at the time of turning-on of power. Consequently, when the computer system is started up, the cache system cannot be utilized to run the operating system (OS) or frequently used application programs (AP). The OA and AP are thus started up by using the low access-speed HDD. With an increase in the scale of the OS and AP, the low access speed of the HDD elongates the time needed to start up the OS and AP. This is considered a serious problem.
To solve this problem, there has been proposed a cache system for an HDD, which uses a flash memory unit comprising a flash EEPROM (electrically erasable programmable read-only memory). The flash memory, unlike the main memory, is a non-volatile storage medium and has a higher access speed than the HDD. Accordingly, in the cache system using the flash memory, the data stored in the flash memory functioning as cache memory can be retained even if the power is switched off, and the cache function is effectively performed at the time of turning on power. Moreover, the flash memory having a higher access speed than the HDD can perform a high-speed buffer function.
As described above, the cache system using the cache memory as flash memory can effectively perform the cache function for the HDD even when the power is turned on. Therefore, the cache system as combined with the HDD can constitute a high-speed, large-capacity external storage system.
In other words, the data storage system comprising the combination of the large-capacity HDD and high-speed, non-volatile flash memory can achieve not only the above-described function but also a function which will influence the performance of the computer system by the effective use of the respective memory units. Specifically, the storage area of the flash. memory is set in accordance with the contents of data to be stored, or the cooperative function of the flash memory and the HDD is set, thereby to effectively use the data storage system, as will be described below.
For example, when information (or control information in the present invention) necessary for starting up the OS or a frequently used AP is to be stored in the storage area in the flash memory, it is desirable that the OS and AP are permanently stored in the flash memory since the frequency of use of both programs is high. On the other hand, for example, when a word search utility program is run for a number of files and the HDD is accessed, it is not important, in general, to permanently store the file accessed from the HDD in the cache memory area of the flash memory. Since such an accessed file is frequently updated, there is no need to permanently store it.
Besides, when the computer system performs a swapping operation, it is possible to store a swap file in the flash memory in place of the HDD. Since the file size of the swap file produced in the swapping operation is variable, the size of the storage area set in the flash memory needs to be variable accordingly. However, since the storage area of the flash memory is limited, it is desirable to perform a cooperative function with the HDD, for example, to use the storage area in the HDD in accordance with the increase in file size of the swap file.